-module(parser_test_util).

-include_lib("eunit/include/eunit.hrl").

-export([validate/1]).

validate([H|T]) ->
	?assert(is_list(H)),
	validate_item(H),
	validate(T);

validate([]) ->
	ok.
	
validate_item([H|T]) ->
	?assert(is_tuple(H)),
	?assertEqual(2, length(tuple_to_list(H))),
	{Key, Value} = H,
	?assert(is_atom(Key)),
	?assert(is_list(Value)),
	validate_item(T);
	
validate_item([]) ->
	ok.